import React, { Component } from 'react';

class App extends Component {
  handleClick = (e) => {
    console.log(e);
    e.preventDefault();
    
  }
  render() {
    return (
      <div>
        <a href='https://www.baidu.com' onClick={this.handleClick}>点击跳转到百度</a>
      </div>
    );
  }
}

export default App;
